﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Module.Manhour.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <fieldset>
        <legend>月结清单列表</legend>
        <asp:GridView ID="gvItem" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="PKey" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
            OnPageIndexChanging="gvItem_PageIndexChanging" onrowcommand="gvItem_RowCommand" >
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                            type="checkbox" title="点击全选或反全选当前页所有信息" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="日期">
                    <ItemTemplate>
                        <a target="_blank" href='Admin/Module/Manhour/View.aspx?y=<%# DataBinder.Eval(Container, "DataItem.CheckYear")%>&m=<%# DataBinder.Eval(Container, "DataItem.CheckMonth")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.CheckYear")%>年<%# DataBinder.Eval(Container, "DataItem.CheckMonth")%>月</a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:BoundField DataField="OperatorName" HeaderText="操作者"></asp:BoundField>
                <asp:BoundField DataField="LastDt" HeaderText="操作时间"></asp:BoundField>
                <asp:TemplateField HeaderText="月结状态">
                    <ItemTemplate>
                        <div class='sign_yn<%# DataBinder.Eval(Container, "DataItem.State")%>'>
                        </div>
                    </ItemTemplate>
                    <ItemStyle Width="60px" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbtn_CheckIn" OnClientClick="return confirm('确定要执行月结操作吗?');" CommandName="CheckIn"  CommandArgument='<%# DataBinder.Eval(Container, "DataItem.PKey") %>'>月结</asp:LinkButton>
                        | <asp:LinkButton runat="server" ID="lbtn_UnCheckIn" OnClientClick="return confirm('确定要执行撤销操作吗?');" CommandName="UnCheckIn"  CommandArgument='<%# DataBinder.Eval(Container, "DataItem.PKey") %>'>撤销</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle Width="80px" />
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                共有<asp:Label runat="server" ID="LAB_PAGER_TOTALCOUNT"></asp:Label>条记录 |
                <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                |
                <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:DropDownList runat="server" ID="DDL_PAGER_SELECTOR" OnSelectedIndexChanged="gvPager_OnSelectedIndexChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                |
                <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
</asp:Content>
